code and refactoring