Adding a counterpart to search function