add server logic