updating resize functionality