Modified document to include "if" statement for the script