Added solutions to exercise 6