some performance tuning