fixed formating of matrices