Another version of refactoring