defaultdict makes it clearer