TODO: make use of the code in the script block