working optimization of test case