basic backpropagation implemented