Some more code related to chats