mostly finished object oriented example