rewrote resize script.
Merge pull request #84 from Boned-777/anotherway

rewrote resize script.