add data analysis code