added latch to GLM