nicely working version of scan.kat3