Add code for assignment 1, part 4.