sleeping routine added to HAL