better text normalization and returning a dict instead of a list