Changed check_company_name function to be recursive.