typed in a class from the book