add list structure to output with matrix