better doc generation