update drawWidget method