Newtonian foundation of general relativity