analysis script halfway done