finished backpropagation logic till part 2;