file to matrix is working