object oriented refactoring