fixed reading files
fixed reading of data as 0's and 1's