add some prototype benchmarking code and fix idiotic bug