added socketio code : still incomplete