Scanning horizontally and vertically