upgraded v3.0 + perf sript