Is there someway to avoid the ```sleep(45)``` here?