fixed problem with exercise 8 and added optional exercise 10