refactoring and new namespace naming logic