added some improvements on the testcase class