Updated Script to be more readable