solution to problem 10 added