now we can build matrix from file