more work on matrix instantiation