Added stopScanning method