more neat way to scale matrix columns and row
change the indexing style of array of matrices