removed time.sleep(1)