working scanner and index designed