Procedural to OO implementation