refactored resolveParent
resolveParent -> resolveNS