take parameter to determine amount of time to sleep