moved phone number search term generation to function