triples function now a generator
working make_dictionary