fixed up gravity example