inline-ing backprop functions