Implemented the chat interface