book example from class, not finished - full example is in exercises dir