implemented doBenchmark

very naive implementation to solve the problem, but it seems to works