Created working preferred_vendor function with date