implement Triple class with some unit tests