Added OOP version.