clean code and refactoring