changing from buffered readers to scanners