BEFORE ADDING WIDGET