replaced ResultHandler with ScannerResult