implemented naive server logic