simplify for-loop-by-namespaces