Adding solution to exercise b1/10.