Update script to use all local variables
Working on understanding indenting for next line