Homework 2 problem 1