add swap and default arithmetic type