update categories widget code.