added Triple class, renamed Pair to Tuple