trip sort update and api commands