updated chap 14 for python3