avoid nested typesmart factories