last_interval renamed to first_interval and test added for first_interval in ascending order