add id to ref