removed the text output for debugging, uses a matrix directly.