this time.sleep could have been resolved with a simple fix