book almost works, refactoring/renaming