code refactoring 6