sorting works for columns