updated to handle changed chat data