implemented scheduler