take min word frequency in to account