factory is not available in __init__