new file:   scanchain.C