did some OOP-ification