glm implementation complete for now