Start of NMF implementation