Einstein came up with the idea of a " cosmological constant " to counter the force of gravity in the universe to keep it static , but Edwin Hubble found the universe to be expanding and Einstein 's fudge factor was abandoned .