depend on previous triplets as well