Part 2 of homework 4.