make sure appropriate data structures are treesets instead of sets to avoid large pickles