Last part of Homework 3.