revised 7.rb so it works