minor reorg of matrix generating motheds