changed the logic for the minimum frequency of the least frequent base.