polishing the final script