add basic server logic