vastly simplified the socketio chat code