rewrite bench.sh and allbench.sh