fix lambda for defaultdict