Adding search function.