Added forward propagation code