day 2: minor refactoring