adding modified analyze.rb