implement a server logic