refactored intersect