sort order and better escape