added a sleep to stop stealing all the cpu