copied from http://ncrawler.codeplex.com/