first pass at basic api