add a GEP helper function