finish OOP refactor