problem 9 first solution