added defaultdict import