Modified tuple2hist