updated to include sort flag