port to GLM2