add one function to compute gravity.