Updated scheduler and .h file to solve the fourth scheduling scenario.