great change in scanning algorythm