solution to problem 14 added