protect the script to be called directly