1. add utils for groupBy and sortBy
2. add a priority option
3. add cache for sorting the tags