updating example script to be callable from third-party script