need to figure out the doc type