Got rid of glm (from iPhone test if the code works)