added function that computes shape similarity score