adding galois code for cdescent