added minTuple and removed createMatrix