add codes to generate test data for fe_invert