moved Interval to struct package