David Hilbert did it a different way.
And Hilbert formulated the problem of gravity as a principle of least action and got to