swap_with_next refactor