corrected format of matrix files
corrected warning about int conversion