Add sort flag to list