added comments regarding the test function and the flow of the script