improved benchmark script