rewrite some more of CuckooSolve