implemented a chat system