Added code for intervalScheduling