add sorting with meta data