first draft of API