add swap, and reset