updated some analysis code