added function to swap columns