finalizing script