training set creation now produces correct random triples