split out IntervalMap into a separate file