refactor for better OOP principles and cleaner benchmarking