update resize method