add ref_type to ref