optimise ThreadTester.java