refactored intersection