add new option for max dictionary size