modified analyze_Zbb.sh