fixed glm helpers to let them take a deviance measure input