move more out of the script