swap the loop order of sumCols