Renamed swap method for clarity