swap_n_fixed and swap_n_dynamic moved to new header file in detail