pass doc to inflate fn