I used a return variable in the first script by assigning the result of the function to a variable and then saying return true in the function to test for successful execution.