changes after code review: added an access specifier, changed logic with operations on namespaces