finish the ch6 scheduler