rewrote resize script.