changes in chat.js