added script, and made corresponding changes for script