Created a way to transform tuples and maintain the reading order