Code for ch 17