add update for resize