add new flag for spvars
support new flag. fix tests