def is_palindrome_permutation_v2(phrase):
    """checks if a string is a permutation of a palindrome"""
    d = dict()
    for c in phrase:
        if c not in d:
            d.update({c: 1})
        else:
            d[c] = 0
    return sum(d[key]%2 for key in d) <= 1