finished chapter 21 examples
bug fix