finished exercise 5 of lab 5