fetch_var_by can take compare