changed wait for input to sleep for 5s