reed and test_reed using purely deterministic approach