source code for gravity