scan algorythm changes