swaps and pointers and arrays