decode the doc