modify nmf algorithm