added comments on the test function