refactored parse_dir and multiple search criteria now working