Nearly finsihed exercise 47