Refactoring tuples