Update swap function.