add swap method