trying to define the api