2.5 Write the forward and backward pass