first cut full api implementation