How did einstein come up with the theory of relativity