add sleep(200) to main while loop to decrease CPU usage