Prelim linescan code