move nrj/nrc outside spice fn