the analysis code working