total method refactoring