simplify global namespace detecting