added check for scheduler