Modified document to include second "if" statement to script