update internal widget code