use dependency injection instead of "new"
pass stateful objects as arguments, so the model inferer is stateless