updated analyze.rb file