Adding exercise 5 to 7