understanding glm with a rect