refactor of jbehave implementation