docstring & made match-index private