completes first draft of api