problem 2.3 1st attempt