more quickscan code. some searching functions.