Direct copy of example script and function