changed to take out data from the middle of the file