improve doc generation to be done all the time