add matrix test