modified the api