added some sleeps to give other routines a chance to run