refactored ensemble.Reasoning.java