handling storing of triples