add search function.