added some operations to script and scriptfuntion