added chunking/canceling to scan, open issue of wavelength agent stopping scan immediately