cleaned up the test code