refactored intersect()