remove dynamic typing in scanner