replacing _id with the given identifier