Added soltution to problem 6.