adding logic behind the analysis status