core utilities for the ni stack