initial broken code from book
partialy done sanity checking
minor fixes
ex26 finished