complete OO refactoring