split out construction of gri ordering