---
id: 65c64057a080baa7d60523ed
title: Step 25
challengeType: 20
dashedName: step-25
---

# --description--

Now, make the `search` method return the result of the `_search()` call.

# --hints--

You should prepend the `return` statement to your `_search()` call.

```js
({ test: () => assert.match(code, /return\s+self\._search\(\s*self\.root\s*,\s*key\s*\)/) });
```

# --seed--

## --seed-contents--

```py

class TreeNode:

    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None


class BinarySearchTree:

    def __init__(self):
        self.root = None

    def _insert(self, node, key):
        if node is None:
            return TreeNode(key)

        if key < node.key:
            node.left = self._insert(node.left, key)
        elif key > node.key:

            node.right = self._insert(node.right, key)
        return node

    def insert(self, key):
        self.root = self._insert(self.root, key)
        
--fcc-editable-region--
    def _search(self, node, key):
        if node is None or node.key == key:
            return node
        if key < node.key:
            return self._search(node.left, key)
        return self._search(node.right, key)
    
    def search(self, key):
        self._search(self.root, key)

--fcc-editable-region--
```
