Implement client-side sorting