Sorry not pseudocode, the documentation in the script file