refactored implementation of jbehave