added a sleep option, will have to test later