add MatrixMath
polish algorithm for pretty printing