working on get-all-ref-tuples