added the code to select max number of steps per interval