switch order of draw and update