How does a scan work