fixed a couple of bugs and setup the benchmarks