re-factor VarSelector