add scheduler class and test cases