add boolean distance tests
add pickle support