Completed exercise 7 to part 5