implement linking to doc id