Updated code exampes for Chap05 and 21