updated te-glm for general use