optimized for the case when class is used as factory vs newable