OOP version of the prototype