finish distribute func and split func mode_a