update resize code