sort the metadata by name