Add custom sorting api