laps and refactoring