minor refactoring
fix perf test