add api for script variable access