building a decision factory