data structs rearranged for GLM
data structs rearranged for GLM