add widget code