refactoring (clean code)