I simplified the implementation, it looks only at the tag itself and sorts alphabetically.