Optimize the schedule in Master