Adding delay to reduce CPU usage