modified GlmY function
added temp.R