add fields to ref_ids