Removed @ infront of data in swap function.