lots of data analysis code