refactoring utils and evidence_accumulation code