updated chp14 for python3