change ref to _id