Scan.m

Beta version of scanning algorithm