improved scheduler