chapter4 examples edited