One of the two GEE helper functions