finished problem 6_2