modified interface

now additionally returns the pair of sample ids corresponding to each distance. after working with this code to generate some plots that i'm interested in, i'm finding that i need this information as well.
improved code associated with the last commit to make it less clunky