write doc