adding print statements to factory methods