legacy system ai integration strategy