write the doc