finished first draft of REST API