change from filereader to scanner