method refactoring