implemented basic rule based similarity measure