updated debug widget code