fixed printmatrix

removed unnecessary printmatrix, whitespaces