Modifications to the reporting part of the script