added scan_dir