Break up the script into two methods