make plotglm speedy with to_json