Improved bench.py