some changes to final_radix and swap.c