overloaded swapnum