more work on matrices