added blocked triangle rules and precomputed blocks based on similarity