Added back sleep to while loop