adding matrix output to master