refactoring GetNameVariant