use nf_new to manage the memory allocation