Function worksheet commit to reflect the debugging of the function, re scoped all variables to the function, including console.log to rerun.