add randtriple: creates a vector with random triples