Update2: Finished exercise6.rb