debugging matrix consolidation