finalized resizing scripts