additional refactoring for OO