added swap and max functions

max returns max of two int (could be overridden latter)
swap , swaps two elements