Replaced nf() global function with a static Helper method