some perf tuning