changed eigen and matrix test code