Refactoring method