edited richness scripts for threshold >= error