refactoring OO