handle doc via visitation and probes and refactor requires