more interval refactoring