we should detect for both legacy and non-legacy namespaces