integrating GLM part