parsed out doc generation into separate script