file reader function edits