ai changes to fit with the API