some OOP refactor