How does the optical scanning device work?