fixed up the logic in this chapter so it branches correctly.