implement Triples
fix Resource#equals

for faster execution