improved namespace resolving