intermediate optimizing and recursive scan method commit