modified scheduler part