switched to data frame for model matrix
factor fix