finished script to insert matrices, just prior to running it on all matrices