reduce memory footprint of glm objects