data analysis code v1