separated scanning and processing