exercise 4a scheduling alogrithm done