Added glm functions