add text search function.