clean up solution to problem 11 a bit