Separate functions for inclusive and exclusive scans