refactor confirm-ns