add ref comparison