Code Refactoring: part 1