Fixing the errors in ex4.
Finished exercise 9