added basic scanner code