changed time.sleep()