in the middle of using eigen vector instead