simplify use of sort