added initial chat server logic