added update() method for widget