Modify search() into search_by_fist() and search_by_list()
One return the first node which is satisfied to condition,
another return the node list contains all the nodes satisfied to condition.