divided scheduling and clearing functionalities
added a helper function for calculating rounds