Adds search function.