fixed the test code