typo rename defaultdict argument to class name as expected.