added tag sorting in filter and loadTags