How Newton discovered gravity