implement some chat history stuff