pass doc to method