switch both rows and columns