add docstring for _sanitize