add a function to swap elements in a u_arraylist