start of oop refactoring