pass term and position to add_match explicitly