change back to search function in matching function (query, text)