Finish writing object oriented version