an nmf implementation with tests