adding changes made to chapter4 stuff