added the sleep option