making cg and cfl deterministic