refactored Eigen