simplify code up through chapter 03