added inputs: interval and number of steps