refactoring of the print out functions and the return of MTX (as yet untested!)