change interval calculation