explain pointers in swap