Client-side sorting