Changed patterns to two-tuples