add functions for GR calculations