Completed part 1 of homework 3.