added 1 second waits around the segment task for safety