code refactoring 7