a sprinkling of light refactoring