Completed till exercise 7