rough sketch of api