getVariants() refactoring