use time.sleep() instead of calling external sleep