updating analyze.rb which now passes both tests