tighten up code - ch9 exercises