code refactoring in the benchmark testing mode.