Step 7 fixed, step 10 now supports multiple matrices