input argument checking
nScan -> nLook everywhere in the code.