adapt to API change