modified the script for the doc