marked @internal method
added support for namespaces