improved debugging and flexibility. Added pass and completion thresholds