A adapted for new scheduler