fix the api