changed how getting data from readfromfile works