tidy the script