all the changes for scheduler except rerun