diff --git a/functions.py b/functions.py
index fefbe9ee90d50517d8f72034e9bf5196904efa29..e50c4210c8428b98a2f17793a9c330bcc28ee3da 100644
--- a/functions.py
+++ b/functions.py
@@ -52,21 +52,21 @@ class Sub(_Function):
     def __init__(self, x, y):
         super().__init__("Sub", x, y)
         #######################################################################
-        # TODO: Implement the forward pass and put the result in self.result.
+        # Implement the forward pass and put the result in self.result.
         # The notbook provide you the formulas for this operation.
         #######################################################################
-        self.result = None
+        self.result = x.data - y.data
         #######################################################################
         # --------------------------- END OF YOUR CODE ------------------------
         #######################################################################
 
     def _backward(self, grad):
         #######################################################################
-        # TODO: Implement the derivative dx for this opetation and add the
+        # Implement the derivative dx for this opetation and add the
         # result of the chain rule on self.dx.
         #######################################################################
-        self.dx = None
-        self.dy = None
+        self.dx = grad
+        self.dy = -grad
         #######################################################################
         # --------------------------- END OF YOUR CODE ------------------------
         #######################################################################
diff --git a/variable.py b/variable.py
index 1e49396665a827073c69727bf6073d2a04249953..e7426a46f82ad0b8894f4f38e82e13e0e3b3b4b2 100644
--- a/variable.py
+++ b/variable.py
@@ -169,9 +169,9 @@ class Variable:
                 children = []
             if not len(children):
                 #######################################################################
-                # TODO: Call the backward of the operation that has build this Variable
+                # Call the backward of the operation that has build this Variable
                 #######################################################################
-                pass
+                self.grad_fn.backward(self.grad, retain_graph)
                 #######################################################################
                 # --------------------------- END OF YOUR CODE ------------------------
                 #######################################################################