Added factory to delegate to other factories based on the value of a field