moved sleep time to separate variable