integrated Eigen3 and updated main()