better API for NamespaceHandler