make the doc script be part of the common API