Added solutions for problem 8.