added support for namespaces