separating scanning and displaying