refactor bdd