refactor benchmark generator