implementing ChatBox