Some updating to the test function