partial chapter 8 control flow
finalise chapter 8 - control flow