update chat.js