change how settime is done, create utility function for looping through waiting functions