some glm functions