after refactor, these should have been in libnp