implements HS scan for part 4 (1.44 msec)