optimized backprop a bit