refactoring of intersect_accuracy