new gravity algorithm added