I don't quite understand writing the function.. especially if it requires time interval in between,,,