Implemented basic server logic