Added new api for variants and spec test