finished exercise 8
rename ex9.rb to ex8.rb