writing the doc