chat_server implementation (in progress)