added solution to exercise 13