new doc generation - 2nd step