scheduler code update