More work done on matrix test case