How to avoid using gradients like a lunatic