the glm version
added family, removed method