finish chat_data module, but test is not enough.
refactoring the code receiving chat_data.