internal search loop added to test.pl resume_template.pl