change from sha to hashlib.sha1
new Truncator class instead of truncate_words()