refactoring and clean code