make ndm actually work.
Merge pull request #47 from bcoe/ndm-fix

make ndm actually work.