Initial working analysis script