begin refactor to OOP