pass doc id to insert callback