Joe fixed matrix math; made output easier to read