more sophisticated loading/saving, this time changing the loaded dicts into defaultdicts. runs rather fast.