add sorting for variants