See attachment for some changes.