Udated 2e.rb per instructor notes. Simplified the program.