updated nH package, small refactoring