WIP analyze-ns implementation