more refactoring fun