Add update() function to force window redraw