Adding widget code