added methods to main.js
added socket.on newMessage and matched to main.js
merged, not sure whats going on