impliments clientid and chatid tracking