Use defaultdict instead of chopping