Added n_min as parameter