finished NMF script