added listToMatrix compactor