Simpler createMatrix impl