fixed typo
used new iterator to extract triples (#13, fixes #20)