Add the option to simulate function; add the functions of sorting leading coefficients in cgb_mod_main