added a measure of similarity