committing finished exercise7.rb