a spot of light refactoring