some more refactoring love