converting to OO class