sorted the sleep list so that the higher priority is woken up first