typeName is now a function