fixed errors and added interval.round