more OO refactoring