refractoring and benchmarks