sort samples for client