code refactoring