setup factory methods and consumer