fixing up the api