make the spinning loop less CPU intense