add swap for N-bytes