update for resize