refactoring oo operation