server code first draft