added some benchmarks (+ some refactoring)