Finished exercise 4 a & b