changed myFile to be a pointer instead of actual file