added printing to matrix-rotate