refactor ensemble [untested]
tests pass