changed to allow selection of what signifies similarity