considering minimum word length
parameterize distance method