Scanner implementation