Working version of Scheduler