pulled out SmartSocket.js