added solution to prob 8
added solution to problem 8