sorting now working for all columns