Implement first version of backprop