Modified the implementaion of schedule class