Sorting the data on client side