grouping all matrices in one file