corresponds to ch3+ of the RoR book