Changed 'tuples' parameter to 'format' which may be 'tuples' - this leaves room for more formats in the future.