use glm instead of eigen