finish up server logic