incapsulated private variables in chat.js