Interval implementation