changed wait time to seconds in main