added getdocument for peer