misc changes to output format
Changd to matrix output