optimize direct scanner