changes in Triplet.java