added fetchDoc method